package com.mars.boss.weixin.mapper;

import org.apache.ibatis.annotations.Param;

import com.mars.base.mybatis.BaseMapper;
import com.mars.boss.weixin.entity.WxOAuthUser;

public interface WxOAuthUserMapper extends BaseMapper<WxOAuthUser, Long> {
	
	/**
	 * 根据OpenId加载用户信息
	 * @param openId
	 * @return
	 */
	public WxOAuthUser getUserByOpenId(String openId) ;

	/**
	 * 根据手机号码加载用户信息
	 * @param openId
	 * @return
	 */
	public WxOAuthUser getUserByMobile(String mobile) ;
	
	/**
	 * 采集或修改用户手机号码
	 * @param openid
	 * @param mobile
	 * @return
	 */
	public boolean updateUserMobile(@Param("openid") String openid, @Param("mobile") String mobile) ;
}